package com.istock.base.handler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.istock.base.dbmigr.model.MigrationCallback;
import com.istock.base.test.dao.ConfigInfoMapper;
import com.istock.base.test.model.ConfigInfo;

import lombok.extern.slf4j.Slf4j;

/**
 * @author 使用mybatis-plus访问数据库的示例
 *
 */
@Component("step2UNDO")
@Slf4j
public class Step2UNDOCallback2 implements MigrationCallback {

	@Autowired
	private ConfigInfoMapper mapper;

	@Override
	public void post() {
		log.info("this is the post in callback2");
		mapper.delete(new QueryWrapper<ConfigInfo>().lambda().eq(ConfigInfo::getConfigKey, "senvon"));
	}

}
